package com.zmn.plat.dubbo.config;

import org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.zmn.mcc.cas.web.dao.RedisSessionDao;

/**
 * 注意：启动不报错引入
 *
 * @uthor nowind
 * @since 2018/09/10 15:48
 */
@Configuration
public class AppConfig {

    @Bean
    public RedisSessionDao redisSessionDao() {
        // 直接从REDIS读取
        RedisSessionDao redisSessionDao = new RedisSessionDao();
        redisSessionDao.setSessionIdGenerator(new JavaUuidSessionIdGenerator());
        // redisSessionDao.setCacheManager(null);
        // redisSessionDao.setActiveSessionsCacheName(null);
        return redisSessionDao;
    }

}
